package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "bi_servitem", schema = "ams", catalog = "")
public class BiServitemEntity {
    private long servitemid;
    private String servitemname;
    private String itemcode;
    private Integer unifprice;
    private Integer commuse;
    private Long chnid;
    private Integer isbook;

    @Id
    @Column(name = "servitemid")
    public long getServitemid() {
        return servitemid;
    }

    public void setServitemid(long servitemid) {
        this.servitemid = servitemid;
    }

    @Basic
    @Column(name = "servitemname")
    public String getServitemname() {
        return servitemname;
    }

    public void setServitemname(String servitemname) {
        this.servitemname = servitemname;
    }

    @Basic
    @Column(name = "itemcode")
    public String getItemcode() {
        return itemcode;
    }

    public void setItemcode(String itemcode) {
        this.itemcode = itemcode;
    }

    @Basic
    @Column(name = "unifprice")
    public Integer getUnifprice() {
        return unifprice;
    }

    public void setUnifprice(Integer unifprice) {
        this.unifprice = unifprice;
    }

    @Basic
    @Column(name = "commuse")
    public Integer getCommuse() {
        return commuse;
    }

    public void setCommuse(Integer commuse) {
        this.commuse = commuse;
    }

    @Basic
    @Column(name = "chnid")
    public Long getChnid() {
        return chnid;
    }

    public void setChnid(Long chnid) {
        this.chnid = chnid;
    }

    @Basic
    @Column(name = "isbook")
    public Integer getIsbook() {
        return isbook;
    }

    public void setIsbook(Integer isbook) {
        this.isbook = isbook;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiServitemEntity that = (BiServitemEntity) o;

        if (servitemid != that.servitemid) return false;
        if (servitemname != null ? !servitemname.equals(that.servitemname) : that.servitemname != null) return false;
        if (itemcode != null ? !itemcode.equals(that.itemcode) : that.itemcode != null) return false;
        if (unifprice != null ? !unifprice.equals(that.unifprice) : that.unifprice != null) return false;
        if (commuse != null ? !commuse.equals(that.commuse) : that.commuse != null) return false;
        if (chnid != null ? !chnid.equals(that.chnid) : that.chnid != null) return false;
        if (isbook != null ? !isbook.equals(that.isbook) : that.isbook != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (servitemid ^ (servitemid >>> 32));
        result = 31 * result + (servitemname != null ? servitemname.hashCode() : 0);
        result = 31 * result + (itemcode != null ? itemcode.hashCode() : 0);
        result = 31 * result + (unifprice != null ? unifprice.hashCode() : 0);
        result = 31 * result + (commuse != null ? commuse.hashCode() : 0);
        result = 31 * result + (chnid != null ? chnid.hashCode() : 0);
        result = 31 * result + (isbook != null ? isbook.hashCode() : 0);
        return result;
    }
}
